﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Demos.WebForms._Default" %>
<%@ Register TagPrefix="n" Assembly="Nucleo.MobileDetection.WebForms" Namespace="Nucleo.Web.Controls" %>
<%@ Import Namespace="System.Web" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
   

	<n:MobilePanel ID="mp" runat="server">
		<div style="border:1px solid black;">
			<h1>This is a Mobile View</h1>
			
			<p>
				A mobile view was determined by the browser, and displayed here.
			</p>
		</div>
	</n:MobilePanel>

	<n:DesktopPanel ID="dp" runat="server">
		<div style="border:1px solid black;">
			<h1>This is a view for a desktop browser.</h1>	

			<p>
				A desktop view was determined by the browser, and displayed here.
			</p>
		</div>
	</n:DesktopPanel>

   <h1>ASP.NET Mobile Settings</h1>
	<p>
		Is Mobile Browser: <%= HttpContext.Current.Request.Browser.IsMobileDevice %>
	</p>
	<p>
		<%= HttpContext.Current.Request.Browser.ScreenPixelsWidth %> width / 
		<%= HttpContext.Current.Request.Browser.ScreenPixelsHeight %> height
	</p>


	<h1>Nucleo WURFL</h1>
	<p>
		Is Mobile Browser: <%= HttpContext.Current.Request.IsMobileDeviceRequest() %>
	</p>
	<p>
		User Agent: <asp:Label ID="UserAgentLabel" runat="server" />
	</p>
	<p>
		<asp:Label ID="CapabilitiesLabel" runat="server" />
	</p>

	<h1>Simulate Mobile</h1>
	<p>
		<asp:Button ID="Simulate" runat="server" Text="Simulate Mobile" OnClick="Simulate_Click" />
	</p>

</asp:Content>
